package com.spzx.product.controller;


import com.spzx.common.core.web.domain.AjaxResult;
import com.spzx.product.service.TestService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "测试接口")
@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    private TestService testService;

    @Value("${server.port}")
    private String port;

    @GetMapping("testLock")
    public AjaxResult testLock(@Value("${server.port}") String port) {
        testService.testLock(port);
        AjaxResult success = AjaxResult.success();
        success.put("code",port);
        return success;
    }
}